# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-stopit
_pkgname=stopit
pkgver=1.1.2
pkgrel=3
pkgdesc='Library to raise asynchronous exceptions in other thread, control the timeout of blocks or callables.'
url='https://pypi.org/project/stopit/#files'
arch=('any')
license=('GPL3')
depends=('python2')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('5ddf93c12ac19e2a2bf52a22838de13da1cf50f1a4d2ef8958dc3ddccd1884b7edaa629edc29121071ba231bfc1e3188bfa089da6e8fc994364c134f0c7aa0c8')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 README.rst "${pkgdir}/usr/share/doc/$pkgname/README.rst"
}

